package cn.enilu.guns.admin.modular.thread;

import cn.enilu.guns.bean.entity.door.EquipmentInfo;
import com.google.common.collect.Sets;

import java.io.Serializable;
import java.util.Set;

/**
 * 监听设备的人员明细及设备连接
 */
public class ReadTimeUser implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 设备连接
     */
    private int hCommPro;

    private Set<String> userKeySet = Sets.newHashSet();
    /**
     * 设备IP地址
     */
    private EquipmentInfo equipmentInfo;

    public int gethCommPro() {
        return hCommPro;
    }

    public void sethCommPro(int hCommPro) {
        this.hCommPro = hCommPro;
    }

    public Set<String> getUserKeySet() {
        return userKeySet;
    }

    public void setUserKeySet(Set<String> userKeySet) {
        this.userKeySet = userKeySet;
    }

    public void putUserKey(String userKey){
        this.userKeySet.add(userKey);
    }
    public void removeUserKey(String userKey){
        this.userKeySet.remove(userKey);
    }

    public EquipmentInfo getEquipmentInfo() {
        return equipmentInfo;
    }

    public void setEquipmentInfo(EquipmentInfo equipmentInfo) {
        this.equipmentInfo = equipmentInfo;
    }
}
